<html>
<body>
<p>Reports invalid usage of <a href="https://www.python.org/dev/peps/pep-0695/">PEP 695</a> type parameter syntax
<p>
  Finds the following problems in function and class definitions and new-style type alias statements:
<ul>
  <li>Extending typing.Generic in new-style generic classes</li>
  <li>Extending parameterized typing.Protocol in new-style generic classes</li>
  <li>Using generic upper bounds and constraints with type parameters for ParamSpec and TypeVarTuple</li>
  <li>Mixing traditional and new-style type variables</li>
  <li>Using traditional type variables in new-style type aliases</li>
</ul>

<p>
  Examples:
</p>
<pre><code>
  from typing import Generic

  class Example[T](Generic[T]): ... # Classes with type parameter list should not extend 'Generic'
</code></pre>

<pre><code>
  class Example[T: (list[S], str)]: ... # Generic types are not allowed inside constraints and bounds of type parameters
</code></pre>

<pre><code>
  from typing import TypeVar

  K = TypeVar("K")

  class ClassC[V]:
      def method2[M](self, a: M, b: K) -> M | K: ... # Mixing traditional and new-style TypeVars is not allowed
</code></pre>
</body>
</html>